package com.itcat.api;

import com.itcat.api.mysql.OmsCompanyAddressApi;
import com.itcat.mapper.OmsCompanyAddressMapper;
import com.itcat.mysql.pojo.OmsCompanyAddress;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@DubboService
public class OmsCompanyAddressApiImpl implements OmsCompanyAddressApi {

    @Autowired
    private OmsCompanyAddressMapper omsCompanyAddressMapper;

    /**
     * 查询公司地址详情
     *
     * @param companyAddressId
     * @return
     */
    public OmsCompanyAddress findOmsCompanyAddress(Long companyAddressId) {
        return omsCompanyAddressMapper.selectById(companyAddressId);
    }

    /**
     * 获取所有收获地址
     *
     * @return
     */
    public  List<OmsCompanyAddress>  getAddress() {
      return    omsCompanyAddressMapper.selectList(null);

    }
}
